﻿using MG.Repository;
using MG.SmartHMI.Model.Common;
using MiniExcelLibs.Attributes;
using SqlSugar;

namespace MG.SmartHMI.Entity.DAO
{
    [SugarTable("driver_RegisterConfig")]
    public class RegisterConfig : BaseEntity
    {
        [ExcelColumn(Name = "名称")]
        public string Name { get; set; } = "新建";

        [ExcelColumn(Name = "排列顺序")]
        public int SortLevel { get; set; } = 0;

        [ExcelColumn(Name = "数据类型")]
        public EnumDataType DataType { get; set; } = EnumDataType.BOOL;

        [ExcelColumn(Name = "控件类型")]
        public EnumControlType ControlType { get; set; } = EnumControlType.NormButton;

        [ExcelColumn(Name = "寄存器地址")]
        public string Address { get; set; } = "0";

        [ExcelColumn(Name = "触发方式")]
        public EnumTriggerType TriggerType { get; set; } = EnumTriggerType.HightLevel;

        [ExcelColumn(Name = "有效值")]
        public string EffectValue { get; set; }

        [ExcelColumn(Name = "字符长度")]
        public int StrLen { get; set; } = 0;

        [ExcelColumn(Name = "显示在主界面")]
        public bool Disp_MainView { get; set; } = false;

        [ExcelColumn(Name = "显示在配方界面")]
        public bool Disp_SlnView { get; set; } = false;

        [ExcelColumn(Name = "显示在调试界面")]
        public bool Disp_DebugView { get; set; } = false;
        [ExcelIgnore(true)]
        public string TestValue { get; set; } = "0";

        [ExcelIgnore(true)]
        public bool EnableTriggerType { get; set; } = false;

        [ExcelIgnore(true)]
        public bool EnableStrLen { get; set; } = false;
    }
}